package org.tongdao.yulong.factorybean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2021年01月11日 下午5:32
 */
@Configuration
public class BeanTypeConfiguration {
  @Bean
  public Child child() {
    return new Child();
  }
//  @Bean
//  public Toy ball() {
//    return new Ball("ball");
//  }
  @Bean
  public ToyFactoryBean toyFactory() {
    ToyFactoryBean toyFactory = new ToyFactoryBean();
    toyFactory.setChild(child());
    return toyFactory;
  }
}
